package cn.edu.hit.education.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.edu.hit.education.dao.RoleMapper;
import cn.edu.hit.education.pojo.Role;
import cn.edu.hit.education.pojo.RoleExample;


/**
 * 
* <p>Title: RoleServiceImlp</p>  
* <p>Description: </p>  
* @author 罗成
* @date 2021年5月4日
 */
@Service
public class RoleServiceImlp implements IRoleService{
	@Autowired
	RoleMapper roleMapper;

	@Override
	public Role queryById(int roleId) {
		
		return roleMapper.selectByPrimaryKey(roleId);
	}

	@Override
	public List<Role> queryAllRoles() {
		// TODO Auto-generated method stub
		RoleExample example = new RoleExample();
		RoleExample.Criteria criteria = example.createCriteria();
		criteria.andIdGreaterThan(0);
		return roleMapper.selectByExample(example);
	}


}
